Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve Babel options ahead of time 🎉 #1262

Merged
merged 5 commits into from
Mar 3, 2017
Merged

Conversation

novemberborn
Copy link
Member

RFC 001 requires us to resolve Babel options in the main process. This PR lands that new behavior, fixing #707 in the process.

Note that with these changes AVA will no longer resolve .babelrc files relative to the test file. Instead it only looks at a .babelrc file in the project directory.

AVA's stage-4 and transform-test-files presets no longer have the package hashes of their plugins included in the caching hash for Babel transforms. This behavior will shift to package-hash itself, see novemberborn/package-hash#22.

The caching hash is now derived from the full Node.js version, rather than just the major. This allows for presets / plugins which vary behavior based on feature differences in minor releases. I'm assuming that people don't update their Node.js versions all of the time, so this shouldn't really have an impact. Note that cached files for other versions are preserved, so this doesn't impact users who switch between Node.js versions.

We're now better at detecting whether Babel options have changed, especially for users who extend other files. We're also hashing the presets and plugins and will reapply transforms when these versions change.

@novemberborn
Copy link
Member Author

We should disable the Babel cache, given that we're now really good at managing it ourselves. Need to set process.env.BABEL_DISABLE_CACHE = '1', perhaps in lib/cli.js.

@sindresorhus
Copy link
Member

Generally looks good. Will give it a more thorough read later today. I've ran it on a bunch of projects of mine and the performance seems to be the same as master, which is good.

@sindresorhus sindresorhus merged commit 0464b14 into master Mar 3, 2017
@sindresorhus sindresorhus deleted the use-hullabaloo branch March 3, 2017 08:54
@sindresorhus
Copy link
Member

sindresorhus commented Mar 3, 2017

Sorry about the delay. I did a thorough review now and nothing more to point out. Excellent work as always Mark.

@novemberborn
Copy link
Member Author

No worries! I better write docs and release hullabaloo at 1.0 now though 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants